#!/usr/bin/groovy
@Library('test-shared-library') _

properties(
        [
                pipelineTriggers([cron('H 16 * * *')]),
                buildDiscarder(logRotator(numToKeepStr: '10'))
        ]
)

def pipeline
def sparkVersions
node("docker") {
    cleanWs()
    checkout scm
    pipeline = load 'jenkins/sparklingWaterPipeline.groovy'
    def versionLine = readFile("gradle.properties")
            .split("\n").find() { line -> line.startsWith('supportedSparkVersions') }
    sparkVersions = versionLine.split("=")[1].split(" ")
}

pipeline(params) { p ->
    sparkMajorVersions = sparkVersions
    runUnitTests = "true"
    runPyUnitTests = "true"
    runRUnitTests = "true"
    runLocalIntegTests = "true"
    runLocalPyIntegTests = "true"
    runScriptTests = "true"
    runIntegTests = "false"
    runPySparklingIntegTests = "true"
    buildAgainstH2OBranch = "true"
    h2oBranch = "master"
    hadoopVersion = "2.7"
    backendMode = "both"
    hdpVersion = "2.2.6.3-1"
    driverHadoopVersion = "hdp2.2"
    uploadNightly = "true"
}
